#!/bin/bash


# 从YAML文件中提取路径
paths=$(awk '/streams:/ {flag=1; next} /- rtsp:/ && flag {print substr($0, index($0, "rtsp"))}' /home/AI/analyze/conf/yolo.yaml| tr -d '\r')

# 将路径拼接成参数字符串
param_string=""
for path in $paths; do
  param_string="$param_string $path"
done

python3 /home/AI/analyze/src/yolo.py -i $param_string --no-display --silent
